import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/css/glodal.css'  //导入全局样式
import './assets/fonts/iconfont.css' //字体图标
import axios from 'axios'
import * as filters from './filters'
import  mess from './assets/js/mess.js'
import TreeTable from 'vue-table-with-tree-grid'

// 导入富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
// 导入富文本样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

axios.defaults.baseURL='http://127.0.0.1:8888/api/private/v1/' //请求根，路径
Vue.prototype.$http=axios
Vue.config.productionTip = false
Vue.prototype.$mess=mess
Vue.component('tree-table',TreeTable)
Vue.use(VueQuillEditor)
axios.interceptors.request.use(config=>{
  config.headers.common.Authorization=window.sessionStorage.getItem('token')
  return config
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
